// *****************************************************************************
// Copyright (c) 2005 - 2017 Qualcomm Technologies International, Ltd.
// %%version
//
// *****************************************************************************

#include "aac_library.h"
#include "core_library.h"

// *****************************************************************************
// DESCRIPTION:
//    AAC Decode
//    Packed up huffman tables that will go into flash
//
// *****************************************************************************



// a flag to indicate that a huffman table hasn't been unpacked yet
.CONST $aacdec.HUFFMAN_TABLE_NOT_UNPACKED   -1;


// -- Packed huffman tables --
// scalefactor huffman table in flash
.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_bookscl[180] =
   0x0018,   0x3C00,   0x3001,   0x0018,   0x3B83,   0xA83D,   0x0030,   0x0100,
   0x183E,   0x83F8,   0x3900,   0x4001,   0x0020,   0x0184,   0x0838,   0x8418,
   0x3700,   0x5001,   0x0020,   0x0183,   0x6842,   0x0018,   0x4384,   0x4835,
   0x0050,   0x0100,   0x2001,   0x8458,   0x3400,   0x1833,   0x8328,   0x4600,
   0x6001,   0x0020,   0x0184,   0x7831,   0x0020,   0x0183,   0x0848,   0x82F8,
   0x4900,   0x6001,   0x0020,   0x0182,   0xE84A,   0x0020,   0x0184,   0xB84C,
   0x84E8,   0x4D00,   0x6001,   0x0020,   0x0182,   0xB82D,   0x0020,   0x0184,
   0xF82C,   0x8298,   0x2A00,   0x6001,   0x0020,   0x0182,   0x8850,   0x0020,
   0x0182,   0x7851,   0x8268,   0x5200,   0x7001,   0x0030,   0x0100,   0x1853,
   0x8238,   0x2500,   0x2001,   0x8218,   0x5582,   0x2824,   0x0060,   0x0100,
   0x2001,   0x8208,   0x5400,   0x2001,   0x8598,   0x5781,   0xF81E,   0x0090,
   0x0100,   0x4001,   0x0020,   0x0181,   0xD856,   0x81B8,   0x1A00,   0x2001,
   0x8188,   0x1C00,   0x1858,   0x8168,   0x1901,   0x6001,   0x0070,   0x0100,
   0x3001,   0x0018,   0x1781,   0x585A,   0x0020,   0x0180,   0x3813,   0x8028,
   0x0100,   0x7001,   0x0030,   0x0100,   0x1800,   0x8638,   0x6200,   0x2001,
   0x8658,   0x6487,   0x5866,   0x0040,   0x0100,   0x2001,   0x85B8,   0x6185,
   0xD85C,   0x0020,   0x0185,   0xF85E,   0x8688,   0x6001,   0x0001,   0x0080,
   0x0100,   0x4001,   0x0020,   0x0187,   0x086F,   0x8728,   0x7100,   0x2001,
   0x8748,   0x7386,   0x986E,   0x0040,   0x0100,   0x2001,   0x86B8,   0x6A86,
   0xD86C,   0x0020,   0x0180,   0x6876,   0x8098,   0x0800,   0x8001,   0x0040,
   0x0100,   0x2001,   0x8058,   0x0A87,   0x8867,   0x0020,   0x0180,   0x4877,
   0x80F8,   0x0700,   0x4001,   0x0020,   0x0181,   0x2810,   0x8118,   0x1400,
   0x2001,   0x80C8,   0x0B80,   0xD80E;


.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book1[120] =
   0x0018,   0x5500,   0x8001,   0x0040,   0x0100,   0x2001,   0x8158,   0x9586,
   0x5854,   0x0020,   0x0185,   0x1856,   0x8458,   0x5901,   0x0001,   0x0080,
   0x0100,   0x4001,   0x0020,   0x0182,   0x5885,   0x8618,   0x5200,   0x2001,
   0x8588,   0x4985,   0x08A5,   0x0040,   0x0100,   0x2001,   0x8418,   0x0586,
   0x4891,   0x0020,   0x0185,   0xA819,   0x8468,   0x9900,   0x8001,   0x0040,
   0x0100,   0x2001,   0x8668,   0x6989,   0x6811,   0x0020,   0x0189,   0x4814,
   0x8448,   0x1601,   0x0001,   0x0080,   0x0100,   0x4001,   0x0020,   0x0182,
   0x18A1,   0x8688,   0x8900,   0x2001,   0x84A8,   0x6288,   0x1848,   0x0040,
   0x0100,   0x2001,   0x8608,   0x9281,   0x8829,   0x0020,   0x0184,   0x2809,
   0x8848,   0x8600,   0x8001,   0x0040,   0x0100,   0x2001,   0x8018,   0x2486,
   0xA840,   0x0020,   0x018A,   0x6898,   0x8A98,   0x2600,   0x8001,   0x0040,
   0x0100,   0x2001,   0x8108,   0x0689,   0x08A4,   0x0020,   0x0180,   0x4812,
   0x89A8,   0x1A00,   0x8001,   0x0040,   0x0100,   0x2001,   0x8228,   0x8888,
   0x2828,   0x0020,   0x0180,   0xA8AA,   0x8088,   0xA000,   0x4001,   0x0020,
   0x018A,   0x2800,   0x82A8,   0x8A00,   0x2001,   0x8028,   0x208A,   0x8880;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book2[120] =
   0x00F0,   0x0100,   0x4001,   0x0018,   0x5500,   0x1895,   0x8568,   0x1500,
   0x4001,   0x0020,   0x0185,   0x4851,   0x8598,   0x4500,   0x3001,   0x0018,
   0x6582,   0x5849,   0x0020,   0x0185,   0x8861,   0x8528,   0x6401,   0x0001,
   0x0080,   0x0100,   0x4001,   0x0020,   0x0188,   0x5814,   0x8058,   0x9100,
   0x2001,   0x8998,   0x5084,   0x6896,   0x0040,   0x0100,   0x2001,   0x8668,
   0x1981,   0x6841,   0x0020,   0x0181,   0x1844,   0x8698,   0xA500,   0xE001,
   0x0060,   0x0100,   0x2001,   0x8948,   0x5A00,   0x2001,   0x8928,   0x6284,
   0x8821,   0x0040,   0x0100,   0x2001,   0x8A48,   0x8982,   0x989A,   0x0020,
   0x018A,   0x9842,   0x8018,   0x1800,   0xD001,   0x0050,   0x0100,   0x2001,
   0x8818,   0x1200,   0x18A1,   0x8248,   0x8600,   0x4001,   0x0020,   0x0181,
   0xA809,   0x8048,   0x0600,   0x2001,   0x8988,   0x4086,   0x0890,   0x0080,
   0x0100,   0x4001,   0x0020,   0x0182,   0x686A,   0x8688,   0x1000,   0x2001,
   0x84A8,   0x8488,   0x88A6,   0x0070,   0x0100,   0x3001,   0x0018,   0x2280,
   0x0882,   0x0020,   0x0182,   0xA828,   0x8088,   0xAA00,   0x4001,   0x0020,
   0x0182,   0x088A,   0x8A08,   0x0A00,   0x2001,   0x8028,   0x808A,   0x88A2;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book3[120] =
   0x0018,   0x0000,   0x4001,   0x0020,   0x0180,   0x1840,   0x8048,   0x1000,
   0x6001,   0x0020,   0x0180,   0x5850,   0x0020,   0x0181,   0x1814,   0x8158,
   0x4400,   0x7001,   0x0020,   0x0185,   0x4841,   0x0020,   0x0184,   0x5855,
   0x0018,   0x5180,   0x2880,   0x00D0,   0x0100,   0x5001,   0x0020,   0x0189,
   0x0806,   0x0018,   0x6481,   0x9809,   0x0040,   0x0100,   0x2001,   0x8168,
   0x6080,   0x8894,   0x0020,   0x0181,   0x8824,   0x8128,   0x2000,   0xB001,
   0x0040,   0x0100,   0x2001,   0x8658,   0x8485,   0x8825,   0x0030,   0x0100,
   0x1859,   0x8488,   0x6100,   0x2001,   0x8218,   0x4985,   0x6895,   0x0080,
   0x0100,   0x4001,   0x0020,   0x0184,   0x6891,   0x81A8,   0x0A00,   0x2001,
   0x8688,   0xA488,   0x1842,   0x0070,   0x0100,   0x3001,   0x0018,   0x2986,
   0x98A0,   0x0020,   0x0188,   0x5852,   0x8A58,   0x5A00,   0x6001,   0x0020,
   0x0182,   0x6828,   0x0020,   0x018A,   0x184A,   0x8A88,   0x9800,   0x4001,
   0x0020,   0x018A,   0x982A,   0x8668,   0x9900,   0x3001,   0x0018,   0x6A88,
   0x8822,   0x0030,   0x0100,   0x1862,   0x8968,   0x8900,   0x3001,   0x0018,
   0x928A,   0x68AA,   0x0020,   0x0188,   0x689A,   0x0018,   0x8288,   0xA8A2;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book4[120] =
   0x0080,   0x0100,   0x4001,   0x0020,   0x0181,   0x5855,   0x8548,   0x5100,
   0x2001,   0x8408,   0x4580,   0x0850,   0x0060,   0x0100,   0x2001,   0x8448,
   0x0500,   0x2001,   0x8148,   0x4181,   0x1801,   0x00A0,   0x0100,   0x2001,
   0x8108,   0x0400,   0x4001,   0x0020,   0x0185,   0x9895,   0x8568,   0x6500,
   0x2001,   0x8918,   0x9488,   0x5864,   0x00F0,   0x0100,   0x7001,   0x0030,
   0x0100,   0x1819,   0x8588,   0x1600,   0x2001,   0x8468,   0x2585,   0x2861,
   0x0040,   0x0100,   0x2001,   0x8908,   0x4986,   0x0884,   0x0020,   0x0181,
   0x2881,   0x8068,   0x2400,   0x9001,   0x0040,   0x0100,   0x2001,   0x8218,
   0x1880,   0x9842,   0x0020,   0x0188,   0x0848,   0x0018,   0x0280,   0x8820,
   0x00A0,   0x0100,   0x4001,   0x0020,   0x018A,   0x5869,   0x85A8,   0x9900,
   0x2001,   0x8968,   0x6600,   0x2001,   0x8A48,   0x6882,   0x9898,   0x0080,
   0x0100,   0x4001,   0x0020,   0x018A,   0x181A,   0x8898,   0x2600,   0x2001,
   0x8A98,   0x4A88,   0x6862,   0x0060,   0x0100,   0x2001,   0x86A8,   0x9200,
   0x2001,   0x8A68,   0x9A8A,   0x0828,   0x0040,   0x0100,   0x2001,   0x8888,
   0x0A88,   0x2822,   0x0020,   0x0182,   0xA8AA,   0x0018,   0xA888,   0xA8A2;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book5[120] =
   0x0018,   0x8400,   0x4001,   0x0020,   0x018A,   0x4864,   0x8838,   0x8500,
   0x4001,   0x0020,   0x0186,   0x58A3,   0x8A58,   0x6300,   0xC001,   0x0040,
   0x0100,   0x2001,   0x8868,   0x4488,   0x28C4,   0x0040,   0x0100,   0x2001,
   0x8C58,   0x438A,   0x6862,   0x0020,   0x018C,   0x3845,   0x8A28,   0x6600,
   0xC001,   0x0040,   0x0100,   0x2001,   0x8E48,   0x2488,   0x7881,   0x0040,
   0x0100,   0x2001,   0x8A78,   0x2386,   0x18E5,   0x0020,   0x018E,   0x3825,
   0x8678,   0xA100,   0xC001,   0x0040,   0x0100,   0x2001,   0x8C68,   0x468C,
   0x2842,   0x0040,   0x0100,   0x2001,   0x8E28,   0x228C,   0x1847,   0x0020,
   0x018C,   0x78E6,   0x8418,   0x2600,   0xC001,   0x0040,   0x0100,   0x2001,
   0x8048,   0x8090,   0x4905,   0x0040,   0x0100,   0x2001,   0x8888,   0x0386,
   0x0903,   0x0020,   0x0186,   0x88A8,   0x8A08,   0x0500,   0x8001,   0x0040,
   0x0100,   0x2001,   0x8218,   0xE184,   0x8827,   0x0020,   0x0190,   0x6802,
   0x8C88,   0xC000,   0x6001,   0x0020,   0x0180,   0x68E7,   0x0020,   0x0190,
   0x2840,   0x8018,   0xE000,   0x4001,   0x0020,   0x018E,   0x8807,   0x9078,
   0x2800,   0x2001,   0x8209,   0x0100,   0x2001,   0x8089,   0x0080,   0x0908;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book6[120] =
   0x0080,   0x0100,   0x4001,   0x0020,   0x018A,   0x4884,   0x8858,   0x8300,
   0x2001,   0x8A58,   0x648A,   0x3865,   0x00D0,   0x0100,   0x5001,   0x0018,
   0x6300,   0x2001,   0x8C58,   0xC384,   0x3845,   0x0040,   0x0100,   0x2001,
   0x8668,   0x448A,   0x28C4,   0x0020,   0x0188,   0x28A6,   0x8868,   0x6200,
   0xC001,   0x0040,   0x0100,   0x2001,   0x8468,   0xC28C,   0x6842,   0x0040,
   0x0100,   0x2001,   0x8E58,   0x2586,   0x78E3,   0x0020,   0x018A,   0x7823,
   0x8618,   0xA100,   0xB001,   0x0040,   0x0100,   0x2001,   0x8248,   0xE488,
   0x7881,   0x0030,   0x0100,   0x18E6,   0x8478,   0x2200,   0x2001,   0x8E28,
   0xC784,   0x18C1,   0x00E0,   0x0100,   0x6001,   0x0020,   0x018E,   0x7826,
   0x0020,   0x0182,   0x18E1,   0x8A08,   0x2700,   0x4001,   0x0020,   0x0190,
   0x5860,   0x8038,   0x0500,   0x2001,   0x9038,   0xA888,   0x0868,   0x0080,
   0x0100,   0x4001,   0x0020,   0x0180,   0x2806,   0x8408,   0xC800,   0x2001,
   0x9068,   0x0484,   0x8902,   0x0050,   0x0100,   0x2001,   0x8C09,   0x0400,
   0x1888,   0x8288,   0x2000,   0x4001,   0x0020,   0x0190,   0x18E0,   0x9078,
   0xE800,   0x2001,   0x8018,   0x0700,   0x2001,   0x8089,   0x0890,   0x0800;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book7[96] =
   0x0018,   0x0000,   0x2001,   0x8018,   0x2000,   0x5001,   0x0018,   0x2100,
   0x2001,   0x8228,   0x4180,   0x2840,   0x00B0,   0x0100,   0x4001,   0x0020,
   0x0182,   0x3861,   0x8608,   0x4200,   0x3001,   0x0018,   0x0386,   0x2843,
   0x0020,   0x0188,   0x1824,   0x8A18,   0x2500,   0xC001,   0x0040,   0x0100,
   0x2001,   0x8448,   0x6388,   0x0804,   0x0040,   0x0100,   0x2001,   0x8458,
   0x8280,   0x58A2,   0x0020,   0x018A,   0x08C1,   0x8838,   0x2600,   0xA001,
   0x0040,   0x0100,   0x2001,   0x8648,   0x6584,   0x68A3,   0x0020,   0x0182,
   0x78C2,   0x0020,   0x0180,   0x6866,   0x8848,   0xC000,   0x8001,   0x0040,
   0x0100,   0x2001,   0x8858,   0xE18A,   0x48E2,   0x0020,   0x0184,   0x78C3,
   0x8C48,   0xE300,   0x5001,   0x0020,   0x0188,   0x68A5,   0x0018,   0x6780,
   0x78E0,   0x0040,   0x0100,   0x2001,   0x8A68,   0xC588,   0x78E4,   0x0020,
   0x018E,   0x58A7,   0x0020,   0x018C,   0x68E6,   0x8E78,   0xC700,   0x0000;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book8[96] =
   0x0080,   0x0100,   0x3001,   0x0018,   0x2182,   0x0841,   0x0020,   0x0180,
   0x1822,   0x0018,   0x4284,   0x0800,   0x00B0,   0x0100,   0x4001,   0x0020,
   0x0186,   0x1802,   0x8628,   0x2300,   0x3001,   0x0018,   0x4388,   0x1863,
   0x0020,   0x0188,   0x2824,   0x8608,   0x4400,   0xC001,   0x0040,   0x0100,
   0x2001,   0x8838,   0x038A,   0x2864,   0x0040,   0x0100,   0x2001,   0x8458,
   0xA18A,   0x3825,   0x0020,   0x0188,   0x4865,   0x8048,   0xA400,   0xA001,
   0x0040,   0x0100,   0x2001,   0x8808,   0x858C,   0x2846,   0x0020,   0x0182,
   0x68C1,   0x0020,   0x018C,   0x3866,   0x8A08,   0xA500,   0x8001,   0x0040,
   0x0100,   0x2001,   0x8058,   0xC48E,   0x1886,   0x0020,   0x0184,   0x78E2,
   0x8E38,   0xC500,   0x5001,   0x0020,   0x018A,   0x6827,   0x0018,   0x678E,
   0x48C6,   0x0040,   0x0100,   0x2001,   0x8878,   0xC08E,   0x5806,   0x0020,
   0x018C,   0x78E6,   0x0020,   0x018E,   0x08A7,   0x8E78,   0x0700,   0x0000;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book9[252] =
   0x0018,   0x0000,   0x2001,   0x8018,   0x2000,   0x5001,   0x0018,   0x2100,
   0x2001,   0x8228,   0x4180,   0x2840,   0x00F0,   0x0100,   0x5001,   0x0020,
   0x0184,   0x2861,   0x0018,   0x2380,   0x3860,   0x0040,   0x0100,   0x2001,
   0x8628,   0x4388,   0x1824,   0x0020,   0x0182,   0x5844,   0x0020,   0x0186,
   0x3882,   0x8808,   0x0401,   0x9001,   0x0090,   0x0100,   0x4001,   0x0020,
   0x0184,   0x58A1,   0x8648,   0x2600,   0x2001,   0x8C18,   0xA200,   0x1883,
   0x8468,   0x0500,   0x8001,   0x0040,   0x0100,   0x2001,   0x8278,   0xA082,
   0x8865,   0x0020,   0x0188,   0x4901,   0x8C28,   0xA300,   0x4001,   0x0020,
   0x0180,   0x68E1,   0x8489,   0x0200,   0x2001,   0x8478,   0x6692,   0x1885,
   0x01E0,   0x0100,   0xE001,   0x0060,   0x0100,   0x2001,   0x8E28,   0x2900,
   0x2001,   0x8A48,   0xC090,   0x38C3,   0x0040,   0x0100,   0x2001,   0x9228,
   0x0788,   0x6868,   0x0020,   0x0180,   0x8867,   0x8C49,   0x4100,   0x8001,
   0x0040,   0x0100,   0x2001,   0x8A58,   0x498E,   0x0900,   0x0020,   0x0194,
   0x28E3,   0x9049,   0x2300,   0x4001,   0x0020,   0x018E,   0x482A,   0x8A68,
   0xC500,   0x2001,   0x8878,   0x8896,   0x1869,   0x01D0,   0x0100,   0xD001,
   0x0050,   0x0100,   0x2001,   0x9208,   0xA800,   0x1905,   0x84A9,   0x4300,
   0x4001,   0x0020,   0x0196,   0x2809,   0x8C69,   0x2400,   0x2001,   0x8899,
   0x8182,   0xB906,   0x0080,   0x0100,   0x4001,   0x0020,   0x0194,   0x4925,
   0x8E58,   0xA700,   0x2001,   0x82C8,   0x4B96,   0x3982,   0x0040,   0x0100,
   0x2001,   0x8A98,   0x6A90,   0x78C7,   0x0020,   0x0180,   0xA964,   0x9838,
   0xE601,   0x4001,   0x0080,   0x0100,   0x4001,   0x0020,   0x0194,   0x5940,
   0x8C88,   0x8A00,   0x2001,   0x9268,   0x4C88,   0xB927,   0x0040,   0x0100,
   0x2001,   0x8C99,   0x608A,   0xA86B,   0x0040,   0x0100,   0x2001,   0x8E89,
   0x0886,   0xC985,   0x0020,   0x018E,   0x7965,   0x9669,   0x8401,   0x0001,
   0x0080,   0x0100,   0x4001,   0x0020,   0x0188,   0xC946,   0x8AB8,   0xE900,
   0x2001,   0x9868,   0x0B98,   0x08CA,   0x0040,   0x0100,   0x2001,   0x8AC9,
   0x4792,   0x88EA,   0x0020,   0x0196,   0x780C,   0x9299,   0x0900,   0x8001,
   0x0040,   0x0100,   0x2001,   0x8EB9,   0x488C,   0xB987,   0x0020,   0x0196,
   0x890B,   0x8CC8,   0xEC00,   0x8001,   0x0040,   0x0100,   0x2001,   0x9499,
   0x0A92,   0xA90C,   0x0020,   0x0192,   0xC92B,   0x9899,   0x4B00,   0x4001,
   0x0020,   0x0196,   0x994A,   0x96A9,   0x8800,   0x2001,   0x98B9,   0x8A00,
   0x2001,   0x96B9,   0x4C98,   0xC96C;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book10[252] =
   0x00F0,   0x0100,   0x5001,   0x0020,   0x0182,   0x2821,   0x0018,   0x4182,
   0x0842,   0x0040,   0x0100,   0x2001,   0x8238,   0x0186,   0x1862,   0x0020,
   0x0186,   0x3843,   0x0020,   0x0180,   0x2840,   0x8828,   0x4401,   0x6001,
   0x0080,   0x0100,   0x4001,   0x0020,   0x0188,   0x1824,   0x8838,   0x0000,
   0x2001,   0x8608,   0x6488,   0x4803,   0x0060,   0x0100,   0x2001,   0x8A28,
   0x4500,   0x2001,   0x8A18,   0x2586,   0x58A3,   0x0040,   0x0100,   0x2001,
   0x8858,   0xA484,   0x68C2,   0x0020,   0x0188,   0x08C3,   0x8048,   0xC101,
   0xB001,   0x00B0,   0x0100,   0x4001,   0x0020,   0x0186,   0x6826,   0x8C48,
   0xA500,   0x3001,   0x0018,   0x868E,   0x28C5,   0x0020,   0x0184,   0x7867,
   0x9028,   0xA600,   0x8001,   0x0040,   0x0100,   0x2001,   0x8A08,   0xE380,
   0x58E1,   0x0020,   0x0182,   0x7901,   0x8E49,   0x0300,   0x4001,   0x0020,
   0x0184,   0x8887,   0x8E58,   0xC600,   0x2001,   0x8688,   0x2888,   0x8904,
   0x01D0,   0x0100,   0xD001,   0x0050,   0x0100,   0x2001,   0x9058,   0xA700,
   0x18A8,   0x8C78,   0xE600,   0x4001,   0x0020,   0x018C,   0x0922,   0x9238,
   0xC800,   0x2001,   0x9218,   0x6980,   0x6849,   0x0080,   0x0100,   0x4001,
   0x0020,   0x0192,   0x4906,   0x9428,   0x8900,   0x2001,   0x8E78,   0x2992,
   0x5907,   0x0040,   0x0100,   0x2001,   0x9438,   0xE894,   0x48A9,   0x0020,
   0x0194,   0x184A,   0x9268,   0x6A01,   0xB001,   0x00B0,   0x0100,   0x4001,
   0x0020,   0x0190,   0x08C9,   0x8E08,   0x8A00,   0x3001,   0x0019,   0x6296,
   0x38E9,   0x0020,   0x0182,   0xA946,   0x9279,   0x6100,   0x8001,   0x0040,
   0x0100,   0x2001,   0x9088,   0x0786,   0xB945,   0x0020,   0x0190,   0x98AA,
   0x8089,   0x6500,   0x4001,   0x0020,   0x0184,   0xB964,   0x8CA8,   0xEA00,
   0x2001,   0x88B9,   0x4798,   0x282B,   0x0100,   0x0100,   0x8001,   0x0040,
   0x0100,   0x2001,   0x9839,   0x288A,   0xB966,   0x0020,   0x0196,   0x7984,
   0x86C9,   0x8500,   0x4001,   0x0020,   0x0192,   0x08CB,   0x9409,   0x4800,
   0x2001,   0x8099,   0x8192,   0x988C,   0x00D0,   0x0100,   0x5001,   0x0020,
   0x0184,   0xC986,   0x0019,   0x0A82,   0xC92A,   0x0040,   0x0100,   0x2001,
   0x9879,   0x688A,   0xC8EB,   0x0020,   0x0194,   0x98CC,   0x9889,   0x0B00,
   0x8001,   0x0040,   0x0100,   0x2001,   0x8EC8,   0x0A94,   0xA960,   0x0020,
   0x0196,   0xA969,   0x96B8,   0x0B00,   0x4001,   0x0020,   0x0194,   0xB92B,
   0x90C9,   0x8000,   0x4001,   0x0020,   0x0194,   0xC989,   0x96C9,   0x2C00,
   0x2001,   0x80C9,   0x8B98,   0xC98A;

.VAR/DMCONST_WINDOWED16 $aacdec.huff_packed_book11[432] =
   0x0190,   0x0100,   0x6001,   0x0020,   0x0182,   0x1800,   0x0020,   0x0182,
   0x0A10,   0x8418,   0x0100,   0x6001,   0x0020,   0x0184,   0x2822,   0x0020,
   0x0186,   0x1823,   0x8408,   0x6200,   0x5001,   0x0020,   0x0180,   0x2843,
   0x0018,   0x6382,   0x4881,   0x0040,   0x0100,   0x2001,   0x8448,   0x8286,
   0x4883,   0x0020,   0x0180,   0x3860,   0x8A28,   0xA103,   0xA001,   0x01A0,
   0x0100,   0xA001,   0x0040,   0x0100,   0x2001,   0x8848,   0x458A,   0x3825,
   0x0020,   0x018A,   0x4865,   0x0020,   0x018C,   0x2885,   0x8C18,   0x4600,
   0x8001,   0x0040,   0x0100,   0x2001,   0x8668,   0xC389,   0x0826,   0x0020,
   0x01A0,   0x5870,   0xA04A,   0x0300,   0x4001,   0x0020,   0x01A0,   0x68C4,
   0x8868,   0x8000,   0x2001,   0x8508,   0x048B,   0x08A5,   0x0100,   0x0100,
   0x8001,   0x0040,   0x0100,   0x2001,   0xA02A,   0x0784,   0x7A08,   0x0020,
   0x0186,   0x78E2,   0x8A68,   0xC500,   0x4001,   0x0020,   0x01A0,   0xA8D0,
   0x8E18,   0xE300,   0x2001,   0x8F0A,   0x0982,   0x7830,   0x0080,   0x0100,
   0x4001,   0x0020,   0x01A0,   0xB887,   0xA0C8,   0xE400,   0x2001,   0xA019,
   0x1093,   0x08C6,   0x0040,   0x0100,   0x2001,   0x8A78,   0x48A0,   0xD950,
   0x0020,   0x0190,   0x2903,   0x8A08,   0x6803,   0x9001,   0x0190,   0x0100,
   0x9001,   0x0040,   0x0100,   0x2001,   0x970A,   0x0E88,   0x88E5,   0x0020,
   0x018E,   0x68C7,   0x0018,   0x05A0,   0xF904,   0x0080,   0x0100,   0x4001,
   0x0020,   0x0182,   0x8990,   0x9D09,   0x0100,   0x2001,   0x9B08,   0xA890,
   0x5869,   0x0040,   0x0100,   0x2001,   0x8498,   0xE792,   0x2906,   0x0020,
   0x019F,   0x0923,   0x8C88,   0x8901,   0x0001,   0x0080,   0x0100,   0x4001,
   0x0020,   0x0192,   0x48C0,   0x9078,   0xA900,   0x2001,   0x8298,   0xE880,
   0x6943,   0x0040,   0x0100,   0x2001,   0x9219,   0x4288,   0xA925,   0x0020,
   0x0192,   0x684A,   0x8C98,   0x6A00,   0x8001,   0x0040,   0x0100,   0x2001,
   0x9089,   0x4492,   0x7945,   0x0020,   0x0182,   0xA963,   0x9468,   0xE000,
   0x4001,   0x0020,   0x0186,   0xB8E9,   0x9418,   0xAA00,   0x2001,   0x9628,
   0x8B8C,   0xA9A2,   0x03B0,   0x0101,   0xB001,   0x00B0,   0x0100,   0x4001,
   0x0020,   0x0184,   0xB9A3,   0x8ABA,   0x0000,   0x3001,   0x0019,   0x6592,
   0x8964,   0x0020,   0x0190,   0x98EA,   0x88D8,   0x1000,   0x8001,   0x0040,
   0x0100,   0x2001,   0x86D8,   0x079A,   0x1966,   0x0020,   0x0198,   0x39A4,
   0x9A58,   0x4D00,   0x4001,   0x0020,   0x018C,   0xB90A,   0x9479,   0x4800,
   0x2001,   0x9849,   0xC288,   0xC82B,   0x0100,   0x0100,   0x8001,   0x0040,
   0x0100,   0x2001,   0x86C9,   0x6198,   0x282D,   0x0020,   0x0186,   0xE8EB,
   0x8AD8,   0xAC00,   0x4001,   0x0020,   0x0188,   0xE9C4,   0x9C39,   0x6700,
   0x2001,   0x9A69,   0x8590,   0x0986,   0x0080,   0x0100,   0x4001,   0x0020,
   0x0184,   0xC968,   0x9C59,   0x2900,   0x2001,   0x94A8,   0xCD90,   0xB9E2,
   0x0040,   0x0100,   0x2001,   0x9C69,   0x2A8A,   0xE949,   0x0020,   0x019C,
   0x1969,   0x8CC8,   0x4E02,   0x0001,   0x0100,   0x0100,   0x8001,   0x0040,
   0x0100,   0x2001,   0x9A88,   0x2C9A,   0x7808,   0x0020,   0x0198,   0x78EC,
   0x9E38,   0xED00,   0x4001,   0x0020,   0x018C,   0xE981,   0x9E58,   0x4F00,
   0x2001,   0x82E9,   0xE488,   0xF92B,   0x0080,   0x0100,   0x4001,   0x0020,
   0x0190,   0xD9C7,   0x90C9,   0xA900,   0x2001,   0x86F8,   0xAF96,   0xA94B,
   0x0040,   0x0100,   0x2001,   0x9E69,   0x8890,   0xE9E7,   0x0020,   0x018E,
   0xE9E1,   0x8099,   0x2001,   0x7001,   0x0080,   0x0100,   0x4001,   0x0020,
   0x0192,   0xC92D,   0x9C89,   0x8900,   0x2001,   0x9C99,   0x4D8C,   0xF98A,
   0x0070,   0x0100,   0x3001,   0x0018,   0xEF9E,   0x892E,   0x0020,   0x0196,
   0xE96B,   0x94C8,   0x2F00,   0x4001,   0x0020,   0x019A,   0xB94E,   0x96D9,
   0xAA00,   0x2001,   0x90F9,   0x6C9A,   0xC9CB,   0x0100,   0x0100,   0x8001,
   0x0040,   0x0100,   0x2001,   0x9E99,   0x8D94,   0x09CA,   0x0020,   0x0192,
   0xF98B,   0x98C8,   0x0A00,   0x4001,   0x0020,   0x0198,   0xE960,   0x9AD9,
   0x4F00,   0x2001,   0x9CC8,   0x0D9E,   0xB9EA,   0x0080,   0x0100,   0x4001,
   0x0020,   0x019C,   0xD96F,   0x80B9,   0xA000,   0x2001,   0x9EC9,   0xAE98,
   0xF9ED,   0x0040,   0x0100,   0x2001,   0x9CE9,   0xC098,   0x09AF,   0x0030,
   0x0100,   0x19CF,   0x80C8,   0x0E00,   0x2001,   0x9E09,   0xEE9E,   0xF80F;



   .VAR/DMCONST_WINDOWED16 num_swb_long_window[NUM_SUPPORTED_FREQS] =
      49,   // 48000Hz
      49,   // 44100Hz
      51,   // 32000Hz
      47,   // 24000Hz
      47,   // 22050Hz
      43,   // 16000Hz
      43,   // 12000Hz
      43,   // 11025Hz
      40;   // 8000Hz

   .VAR/DMCONST_WINDOWED16 num_swb_short_window[NUM_SUPPORTED_FREQS] =
      14,   // 48000Hz
      14,   // 44100Hz
      14,   // 32000Hz
      15,   // 24000Hz
      15,   // 22050Hz
      15,   // 16000Hz
      15,   // 12000Hz
      15,   // 11025Hz
      15;   // 8000Hz


   .VAR/DMCONST_WINDOWED16 swb_offset_long_48[] =  // 48000Hz long win, scalefactor band offsets
       0,   4,   8,   12,  16,  20,  24,  28,  32,  36,  40,  48,  56,  64,
       72,  80,  88,  96,  108, 120, 132, 144, 160, 176, 196, 216, 240, 264,
       292, 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704,
       736, 768, 800, 832, 864, 896, 928, 1024;

   .VAR/DMCONST_WINDOWED16 swb_offset_long_32[] =  // 32000Hz long win, scalefactor band offsets
       0,   4,   8,   12,  16,  20,  24,  28,  32,  36,  40,  48,  56,  64,
       72,  80,  88,  96,  108, 120, 132, 144, 160, 176, 196, 216, 240, 264,
       292, 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704,
       736, 768, 800, 832, 864, 896, 928, 960, 992, 1024;

   .VAR/DMCONST_WINDOWED16 swb_offset_long_24[] =  // 24000Hz long win, scalefactor band offsets
       0,   4,   8,   12,  16,  20,  24,  28,  32,  36,  40,  44,  52,  60,
       68,  76,  84,  92,  100, 108, 116, 124, 136, 148, 160, 172, 188, 204,
       220, 240, 260, 284, 308, 336, 364, 396, 432, 468, 508, 552, 600, 652,
       704, 768, 832, 896, 960, 1024;

   .VAR/DMCONST_WINDOWED16 swb_offset_long_16[] =  // 16000Hz long win, scalefactor band offsets
       0,   8,   16,  24,  32,  40,  48,  56,  64,  72,  80,  88,  100, 112,
       124, 136, 148, 160, 172, 184, 196, 212, 228, 244, 260, 280, 300, 320,
       344, 368, 396, 424, 456, 492, 532, 572, 616, 664, 716, 772, 832, 896,
       960, 1024;

   .VAR/DMCONST_WINDOWED16 swb_offset_long_8[] =   // 8000Hz long win, scalefactor band offsets
       0,   12,  24,  36,  48,  60,  72,  84,  96,  108, 120, 132, 144, 156,
       172, 188, 204, 220, 236, 252, 268, 288, 308, 328, 348, 372, 396, 420,
       448, 476, 508, 544, 580, 620, 664, 712, 764, 820, 880, 944, 1024;

   .VAR/DMCONST_WINDOWED16 swb_offset_short_48[] =  // 48000Hz short win, scalefactor band offsets
       0,   4,   8,   12,  16,  20,  28,  36,  44,  56,  68,  80,  96,  112, 128;

   .VAR/DMCONST_WINDOWED16 swb_offset_short_24[] =  // 24000Hz short win, scalefactor band offsets
       0,   4,   8,   12,  16,  20,  24,  28,  36,  44,  52,  64,  76,  92,  108, 128;

   .VAR/DMCONST_WINDOWED16 swb_offset_short_16[] =  // 16000Hz short win, scalefactor band offsets
       0,   4,   8,   12,  16,  20,  24,  28,  32,  40,  48,  60,  72,  88,  108, 128;

   .VAR/DMCONST_WINDOWED16 swb_offset_short_8[] =   // 8000Hz short win, scalefactor band offsets
       0,   4,   8,   12,  16,  20,  24,  28,  36,  44,  52,  60,  72,  88,  108, 128;

   .VAR/DMCONST_WINDOWED16 swb_offset_long_table[NUM_SUPPORTED_FREQS] =
       &swb_offset_long_48,  // 48000Hz
       &swb_offset_long_48,  // 44100Hz
       &swb_offset_long_32,  // 32000Hz
       &swb_offset_long_24,  // 24000Hz
       &swb_offset_long_24,  // 22050Hz
       &swb_offset_long_16,  // 16000Hz
       &swb_offset_long_16,  // 12000Hz
       &swb_offset_long_16,  // 11025Hz
       &swb_offset_long_8;   // 8000Hz

   .VAR/DMCONST_WINDOWED16 swb_offset_short_table[NUM_SUPPORTED_FREQS] =
       &swb_offset_short_48,  // 48000Hz
       &swb_offset_short_48,  // 44100Hz
       &swb_offset_short_48,  // 32000Hz
       &swb_offset_short_24,  // 24000Hz
       &swb_offset_short_24,  // 22050Hz
       &swb_offset_short_16,  // 16000Hz
       &swb_offset_short_16,  // 12000Hz
       &swb_offset_short_16,  // 11025Hz
       &swb_offset_short_8;   // 8000Hz

   .VAR/DMCONST_WINDOWED16 sampling_freq_lookup[16] =
      -1,   // 96000Hz
      -1,   // 88200Hz
      -1,   // 64000Hz
       0,   // 48000Hz
       1,   // 44100Hz
       2,   // 32000Hz
       3,   // 24000Hz
       4,   // 22050Hz
       5,   // 16000Hz
       6,   // 12000Hz
       7,   // 11025Hz
       8,   // 8000Hz
      -1,   // reserved
      -1,   // reserved
      -1,   // reserved
      -1;   // reserved

